//main file for pokercards -Branton
#include "cards.h"
#include "deck.h"
#include "player.h"
#include "blackjack.h"
#include <iostream>
#include <limits>

using namespace std;
int main()
{
  //  cout << "Welcome to the Poker Program" << endl;
  // cout << "Working on initializing cards & deck....." << endl;
  srand(time(0)); //Part of randomization, time is located in cards.h

  //initialize new deck
  /*
  Deck newDeck;
  newDeck.PrintDeck();
  */  

  /*
  cout << "testing player class" << endl;
  //  Player John = new Player();
  Player player1 = Player("Player 1",5,9999);
  Player player2 = Player("Player 2",5,5000);
  for(int i=0;i<5;i++){
    player1.DealCard(newDeck);
    player2.DealCard(newDeck);
  }
  player1.PrintHand();
  player2.PrintHand();
  cout<<"Printing Deck..."<<endl;
  newDeck.PrintDeck();
  */
  //code for blackjack w/o networking
  
  int n;
  cout<<"Blackjack"<<endl<<endl;
  while((std::cout<<"Input Number of Players for Blackjack: ")
	&& !(std::cin>>n)){
    std::cout<<"That's not a number"<<endl;
    std::cin.clear();
    std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
  }
  //cout<<n<<endl;
  //cin>>n;
  Blackjack bj =  Blackjack(n);
  bj.Play();
  

  //code for blackjack with networking
  //cout<<"Blackjack"<<endl<<endl;
  //Blackjack bj = Blackjack(2);
  //bj.PlayOnline();





  return 0;
}
